package com.test.OrderPattern;

/**
 * 请求类，命令的执行者
 *
 * @author muxiaoyu
 * @create 2017/06/19 17:16
 **/
public class Stock {
    private String name = "ABC";
    private int quantity = 10;

    public void buy() {
        System.out.println("buy method:" + this.toString());
    }

    public void sell() {
        System.out.println("sell method:" + this.toString());
    }

    @Override
    public String toString() {
        return "Stock{" +
                "name='" + name + '\'' +
                ", quantity=" + quantity +
                '}';
    }
}
